import request from "@/network/request";


export function listRole(pageModel) {
    return request({
        url: '/system/role/list',
        params: pageModel
    })
}

export function saveRole(params) {
    return request({
        url: '/system/role/save',
        data: params
    })
}

export function deleteRole(id) {
    return request({
        url: '/system/role/delete/' + id,
    })
}

export function roleResource(roleId) {
    return request({
        url: '/system/roleResource/list',
        params: {
            roleId
        }
    })
}


export function saveRoleResource(roleId, resourceList) {
    return request({
        url: '/system/roleResource/saveRoleResource',
        params: {
            roleId
        },
        data: resourceList
    })
}